import { lazy,Suspense } from "react"
import {Route,Routes, Navigate} from 'react-router-dom'
const Index = lazy(()=>import('./pages')) ;
const Login = lazy(()=>import('./pages/login')) ;

function App() {
  return (
    <div className="App">
      <Suspense>
      <Routes>
        <Route path='/login' element={<Login/>} />
        <Route path='/index/*' element={<Index/>} />
        <Route path='*' element={<Navigate to='/index' />} />
      </Routes>
      </Suspense>
    </div>
  );
}

export default App;
